{{include 'share/header'}}
{{include 'share/navbar'}}

<div class="container question">
	<div class="banner">
		<div class="con">
			<ul>
				<li><img src="images/ba1.jpg" alt="" /></li>
				<li><img src="images/ba2.jpg" alt="" /></li>
				<li><img src="images/ba3.jpg" alt="" /></li>
			</ul>
			<div class="nava">
				<span class="oon">1</span>
				<span>2</span>
				<span>3</span>
			</div>
			<div class="preva"><</div>
			<div class="nexta">></div>
		</div>
	</div>
</div>

<div class="container question">
	{{each question as q i}}
    <ul class="list-group">
	    <li class="list-group-item list-group-item-success list-relative" data-id = {{q.id}}>
	        <div class="list-header">
	            <img {{if q.userId.image}}src="{{q.userId.image}}" {{else}}src='images/user.png'{{/if}}alt="">
	            <div class="info info-left">
	            	<a class="none" href="/"+{{q.userId.id}}></a>
	                <span>{{q.name}}</span>
	                <span class="font">{{q.time | getTime}}</span>
	            </div>
	        </div>
	        <div class="list-body">
	            <p>{{q.content}}</p>
	        </div>
	        <button class="btn answer">我来回答</button>
	        <button class="btn btn-success delete">×</button>
	        
	    </li>
	    {{each q.ans as an i}}
	        {{include 'share/answers' an}}
	    {{/each}}
    </ul>
  	{{/each}}
  
   {{if pages}}
  <nav>
  <ul class="pagination">
    <li {{if page==1}}class="disabled"{{/if}}><a href="#">&laquo;</a></li>
    {{each pages as p i}}
    <li {{if p==page}}class="active"{{/if}}><a href="/?page={{p}}">{{p}}</a></li>
    {{/each}}
    <li {{if page==count}}class="disabled"{{/if}}><a href="#">&raquo;</a></li>
  </ul>
</nav>
{{/if}}
</div>
<script src="js/index.js"></script>
{{include 'share/modal'}}
{{include 'share/footer'}}
